package com.xsr.utils.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * @author 邢式瑞
 * @version 1.0
 * @project xiaomishangcahng
 * @date 2022/8/24 14:40
 */
public class RandomUtils {
    public  static String createCode(){

        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
      return  sdf.format(new Date())+Integer.toHexString(new Random().nextInt(99999));
    }

    public  static String createOrderId(){

        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        return  sdf.format(new Date())+ new Random().nextInt(9000);
    }

}
